<template>
  <nav>
    <ul>
      <router-link tag="li" :to="{ name: 'index1' }" active-class="active">
        <span>美团账号登录</span>
      </router-link>
      <router-link tag="li" :to="{ name: 'index2' }" active-class="active">
        <span>手机验证登录</span>
      </router-link>
    </ul>
  </nav>
</template>

<style lang="scss" scoped>
nav {
  width: 100%;
  height: 50px;
  line-height: 50px;
  border-bottom: 1px solid #ccc;
  background: #fff;
  z-index: 1;
  ul {
    display: flex;
    text-align: center;
    li {
      flex: 1;
      display: flex;
      justify-content: center;
      &.active {
        span {
          width: 100%;
          border-bottom: 2px solid red;
          display: block;
          color: #fe5100;
        }
      }
    }
  }
}
</style>
